#coding=utf-8
def func(a,b,c):
    if a > b and b > c:
        return (a,c)
    elif a > c and b > a:
        return (b,c)
    elif a < c and b > c:
        return (b,a)
    elif a < b and b < c:
         return (c,a)
print func(1,2,3)
'''
测试一下多个参数有默认的在中间的情况
'''
#def test(a,b=0,c):
 #   return (a,b,c)
#print test(1,2,3)
#经过测试默认参数必须放在最后



def length(a,b):
    d = len(a)
    f = len(b)
    if d > f :
        return a
    else:
        return b
print length('122233','sgdshdhshdhsh')


def compare(a,b,c):
    d = max(a,b,c)
    e = min(a,b,c)
    return (d,e)
print compare(1,2,3)

def get_doc(moudle):
    '''
    关于本方法的是为什么产生
    :return:
    '''
    return moudle
print get_doc(5).__doc__


def get_text(source):
    f = open(source,'r')
    s = f.readline()
    return s
    f.close()
print get_text('D:\python/NEWS.txt')

import glob
def get_dir(path):
    return glob.glob(path)
print get_dir(r'D:\demo/*')